# Contributor: jane400 <alpine@j4ne.de>
# Maintainer: jane400 <alpine@j4ne.de>
pkgname=phosh-osk-stub
pkgver=0.34.0
pkgrel=0
pkgdesc="OSK experiment and helper to debug input related issues with phosh"
arch="all"
url="https://gitlab.gnome.org/guidog/phosh-osk-stub"
license="GPL-3.0-or-later"
subpackages="$pkgname-doc"
makedepends="
	cmd:rst2man
	elogind-dev
	feedbackd-dev
	glib-dev
	gnome-desktop-dev
	gtk+3.0-dev
	hunspell-dev
	json-glib-dev
	libhandy1-dev
	meson
	wayland-dev
	wayland-protocols
	"
checkdepends="xvfb-run"
source="https://gitlab.gnome.org/guidog/phosh-osk-stub/-/archive/v$pkgver/phosh-osk-stub-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

provides="phosh-keyboard"
provider_priority=1
replaces="phosh squeekboard"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dman=true \
		. output
	meson compile -C output
}

check() {
	xvfb-run -a meson test --no-rebuild --print-errorlogs -C output
}

package() {
	depends="!squeekboard"
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
6a78483e69ae6cec9bcaf7e890431705f91dff47eb0732ec66c18b4d26d2e6bc273a18b1fd5a82d010d157d68050450eda3f35a773e28d4fec8669a69c531eed  phosh-osk-stub-v0.34.0.tar.gz
"
